/******************* 公共变量 *******************/
var userId = core.getUrlData('user_id'),
	registerUserId = core.getUrlData('bm_user_id'),
	register = core.getUrlData('register'),
	activityId = core.getUrlData('activity_id');

/******************* Vue初始化代码 *******************/
var vm = new Vue({
	el: 'body .wrap',
	data: {
		id: '',
		username: '',
		sex: '',
		age: '',
		star: '',
		introduction: '',
		city: '',
		job: '',
		photo_id: '',
		is_verify: '',
		label: '',
		helloword: '',
		body_shape: '',
		user_detail: userDetailUrl,
		user_activity: userActivityUrl,
		user_wallet: userWalletUrl,
		user_identity: userIdentifyUrl,
		user_setting: userSettingUrl
	},
	methods: {
		share: function () {
			layer.open({
				content: '<img src="' + shareImg + '" alt="" title="">',
				shadeClose: false,
				className: 'share',
				success: function (ele) {
					$('body .layui-m-layer .layui-m-layermain .layui-m-layersection .share, .layui-m-layershade').on('tap', function () {
						layer.close($(ele).attr('index'));
					});
				}
			});
		},
	},
	computed: {
		
	},
	created: function () {
		/******************* 个人信息载入 *******************/
		var _this = this;
		ajax.load({
			url: userInfoUrl,
			type: 'post',
			data: {user_id: userId},
			callback: function (data) {
				console.log(data)

				$.extend(vm, data.list);
			}
		});
	},
	mounted: function () {
		$.ajax({
			url: checkNews,
			type: 'post',
			success: function(data) {
				console.log(data);

				common.hintNewMsg(data);
			}
		});
		common.bindBack();
	}
});


